package com.xunwulian.cmpp.pdu;

import com.xunwulian.cmpp.sms.ByteBuffer;
import com.xunwulian.cmpp.sms.PDUException;
import com.xunwulian.cmpp.util.CmppConstant;

import java.io.Serializable;

public class ActiveTest extends Request implements Serializable {

    private static final long serialVersionUID = 1236739251542142663L;

    public ActiveTest() {
        super(CmppConstant.CMD_ACTIVE_TEST);
    }

    public Response createResponse() {
        ActiveTestResp activeTestResp = new ActiveTestResp();
        activeTestResp.setSequenceNumber(getSequenceNumber());
        activeTestResp.setCommandId(CmppConstant.CMD_ACTIVE_TEST_RESP);
        return activeTestResp;
    }

    public void setData(ByteBuffer buffer) throws PDUException {
        header.setData(buffer);
    }

    public ByteBuffer getData() {
        return header.getData();
    }

    public String name() {
        return "CMPP ActiveTest";
    }

    @Override
    public String dump() {
        return super.dump();
    }

}
